package br.com.chat;

import java.io.Serializable;

public class Message implements Serializable {

    private static final long serialVersionUID = 1L;

    private User from;
    private User to;
    private CharSequence content;

    public Message(User from, User to, CharSequence content) {
        super();
        this.from = from;
        this.to = to;
        this.content = content;
    }

    public Message(User from, User to) {
        super();
        this.from = from;
        this.to = to;
    }
    
    public CharSequence getContent() {
        return content;
    }
    
    public void setContent(CharSequence content) {
        this.content = content;
    }
    
    public User getFrom() {
        return from;
    }
    
    public User getTo() {
        return to;
    }
    
    @Override
    public String toString() {
        return "From: " + getFrom().getName() + " To: " + getTo().getName() + " Content: " + getContent();
    }

}
